@import './variables.scss';
@import './mixin.scss';
@import './transition.scss';
@import './element-ui.scss';
@import './sidebar.scss';
@import './btn.scss';
@import './userDefinedBaseClass.scss';

body {
  height: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
}

label {
  font-weight: 700;
}

html {
  height: 100%;
  box-sizing: border-box;
}

#app {
  height: 100%;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

.no-padding {
  padding: 0px !important;
}

.padding-content {
  padding: 4px 0;
}

a:focus,
a:active {
  outline: none;
}

a,
a:focus,
a:hover {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

div:focus {
  outline: none;
}

.fr {
  float: right;
}

.fl {
  float: left;
}

.pr-5 {
  padding-right: 5px;
}

.pl-5 {
  padding-left: 5px;
}

.block {
  display: block;
}

.pointer {
  cursor: pointer;
}

.inlineBlock {
  display: block;
}

.clearfix {
  &:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
  }
}

aside {
  background: #eef1f6;
  padding: 8px 24px;
  margin-bottom: 20px;
  border-radius: 2px;
  display: block;
  line-height: 32px;
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  color: #2c3e50;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  a {
    color: #337ab7;
    cursor: pointer;

    &:hover {
      color: rgb(32, 160, 255);
    }
  }
}

//main-container全局样式
.app-container {
  padding: 20px;
}

.components-container {
  margin: 30px 50px;
  position: relative;
}

.pagination-container {
  margin-top: 0px;
}

.text-center {
  text-align: center
}

.sub-navbar {
  height: 50px;
  line-height: 50px;
  position: relative;
  width: 100%;
  text-align: right;
  padding-right: 20px;
  transition: 600ms ease position;
  background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%);

  .subtitle {
    font-size: 20px;
    color: #fff;
  }

  &.draft {
    background: #d0d0d0;
  }

  &.deleted {
    background: #d0d0d0;
  }
}

.link-type,
.link-type:focus {
  color: #337ab7;
  cursor: pointer;

  &:hover {
    color: rgb(32, 160, 255);
  }
}

.filter-container {
  padding-bottom: 10px;

  .filter-item {
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 10px;
  }
}

//refine vue-multiselect plugin
.multiselect {
  line-height: 16px;
}

.multiselect--active {
  z-index: 1000 !important;
}

$--definition-table-form-title-color: #333; // 表格+表单+对话框 标题颜色
$--definition-border-color: #dcdfe6; // 边框颜色
$--definition-table-header-background-color: #f2f2f2; // 表格头部背景颜色

// dialog头部
.el-dialog__title {
  color: $--definition-table-form-title-color;
}

.el-dialog__header {
  padding-bottom: 20px;
  font-weight: 700;
  border-bottom: 1px solid $--definition-border-color;
}

.el-dialog__body {
  padding-top: 24px;
  padding-bottom: 24px;
}

// dialog底部
.el-dialog__footer {
  padding-top: 20px;
  border-top: 1px solid $--definition-border-color;
}

// 抽屉
.el-drawer__header {
  margin-bottom: 20px;
  color: $--definition-table-form-title-color;
  font-weight: 700;
}

.el-drawer__body {
  // padding: 20px;
  border-top: 1px solid $--definition-border-color;
}

// 抽屉-去除标题黑色边框
.el-drawer__header span:focus {
  outline: none;
}

// 查询表单 的el-form都需要加此样式
.box-query-form {
  background-color: #fff;
  padding: 30px 30px;
  border-radius: 2px;

  .el-col {
    padding: 0 8px;
  }

  .el-date-editor {
    width: 100%;
  }

  .el-select {
    width: 100%;
  }
}

// 表单
.el-form {
  .el-form-item__label {
    color: $--definition-table-form-title-color;
    font-weight: normal;
  }

  .el-form-item {
    margin-bottom: 16px;
  }
}

// label-top的表单
.el-form--label-top {
  .el-form-item__label {
    line-height: 30px;
    padding-bottom: 8px;
  }
}

// el-input后置内容padding
.el-input-group__append,
.el-input-group__prepend {
  padding: 0 15px;
}

// (新增编辑)页面的样式 - 下拉框和日期宽度拉满
.box-container {
  .box-card {
    .el-card__body {
      padding-left: 0;
      padding-right: 0;

      .el-form {
        @extend .clearfix; //解决塌陷

        .el-select {
          width: 100%;
        }

        .el-date-editor {
          width: 100%;
        }
      }
    }
  }
}

// 表格头部 
.el-table th {
  color: $--definition-table-form-title-color;
  background-color: $--definition-table-header-background-color;
}

// 表格滚动条顶部
.el-table__fixed-right-patch {
  background-color: $--definition-table-header-background-color;
}

// // 新增按钮
// .btnAdd {
//   color: $subjectColor;
//   border: 1px solid $subjectColor;

//   &:hover {
//     color: $subjectColor !important;
//     border: 1px solid $subjectColor !important;
//   }
// }


// 通用页面样式 需要确保类名一致
$batchActionHeight: 35px; //批量操作行高

.box-container {
  .box-query-form {
    background-color: #fff;
    padding: 30px 30px;
    border-radius: 2px;

    .el-col {
      padding: 0 8px;
    }

    .table-search-btn {
      text-align: left;
    }
  }

  .box-table {
    margin-top: 16px;
    background-color: #fff;
    padding: 24px 20px 10px;
    border-radius: 2px;

    .table-title {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 24px;

      .table-title-left {
        font-size: 18px;
      }
    }

    // 批量操作
    .batchAction {
      display: flex;
      justify-content: space-between;
      align-items: center;
      height: $batchActionHeight;
      margin-bottom: 10px;

      .batchAction-left {
        width: 130px;
        height: 100%;
        line-height: $batchActionHeight;
      }

      .batchAction-right {
        flex: 1;
        padding-left: 50px;
        border-radius: 3px;
        border: 1px solid #91d5ff;
        background-color: #e6f7ff;
        height: 100%;
        line-height: $batchActionHeight;
        color: #505659;

        .el-link {
          vertical-align: bottom;
        }
      }
    }
  }

  .box-paging {
    text-align: right;
  }
}